#include <iostream>
#include <string>
#include <cstring>

#define PREFIX "[RES]"

int main() {
    std::string res("/data/resources/res/dfadf/task_res");
    std::string src("[RES]/aa/b.f");
    std::size_t found = src.find(PREFIX);

    switch (found) {
    case 0:
        std::cout << "[ INFO ] found. pos: " << found << std::endl;

        src.replace(found, strlen(PREFIX), res);
        std::cout << "[ INFO ] final path: " << src << std::endl;

        break;
    case std::string::npos:
        std::cerr << "[  ERR ] not found any "<< std::endl;
        break;
    default:
        std::cerr << "[ WARN ] found by not at begin! pos: " << found << std::endl;
        break;
    }

    return 0;
}
